Repository navigation
feat(superagent): inbox and workers schedulers with DSH - #7641
Open
openviking-superagent wants to merge 8 commits into
Open
openviking-superagent wants to merge 8 commits into
openviking-superagent wants to merge 8 commits into
Conversation
agents[].scheduler (default legacy) picks how accepted inputs reach the model. With inbox, an input that arrives while a turn runs waits in an inbox: the model gets one [daemon inbox] notice per burst (which chats, how many, who; never the text) and reads the inputs oldest first with message_check at a checkpoint. An idle runtime starts a turn with the oldest waiting inputs. Inputs are delivered through AgentRuntime.submit, so adapters book them like steered input (journal, inbound seqs, decision check). A delivery held by the freshness fence while newer input there still waits delivers that input. Waiting inputs persist in inbox_pending (created on first use) and survive a restart. Legacy keeps prompt, tools, policyHash and schema unchanged; Ark rejects inbox, OpenCode gets no mid-turn notices. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agents[].scheduler workers makes the main session a router on top of the inbox: it answers what is quick and hands longer work to a task with task_create (task_route, task_stop, task_list). A worker is a separate session on the router's own runtime, run one turn at a time in its non-interactive mode (pi --mode json -p, codex exec, claude --print), so an idle task holds no process. It reads with the Core read tools under an authority valid for its turn, pulls new inputs with task_check, and reports with task_report; it can deliver nothing. Reports reach the router through the inbox as quoted [task report] lines and the router relays them where the request was made, so it stays the only outlet and every delivery check applies. A result is relayed only after the worker read what the requester added during its turn. Tasks, inputs and reports live in SQLite; a restart resumes a cut turn with a recovery note. Inputs carry a [daemon tasks] line naming tasks they may belong to. Three turns run at once plus a slot kept for follow-ups. On Pi the router's own shell is capped at 30 s and may not sleep. Routing an input records it as decided; OnIt stays up while its task's worker runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
openviking-superagent
force-pushed
the
feat/superagent-router-worker-dsh
branch
from
November 13, 2026 17:35
1af7d4c to
a058c7e
Compare
…dows The generated fake Codex imports the action client by absolute path. A Windows path embedded verbatim in an ESM specifier is parsed as protocol 'd:' and the child exits with ERR_UNSUPPORTED_ESM_URL_SCHEME, so the inbox and workers integration tests cannot start their runtime on Windows. Emit a file URL instead; it is valid on every platform.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ports #7227 onto the current
feat/vika/ OpenViking SuperAgent baseline and adds DSH as a Router + Worker runtime.The port preserves the original scheduler behavior:
legacy: immediate steering, with the previous prompt, tools, policyHash and schema.inbox: durable waiting inputs, notices,message_check, oldest-first wake-up and freshness-fence interplay.workers: the main session routes longer work withtask_create/task_route; workers only read and report, while the router remains the only delivery outlet. Task state, input claims, 3+1 slots, retries and durable report delivery remain inTaskManager/ SQLite.Current-baseline adaptation
vika/tosuperagent/.OV_SUPERAGENT_SCHEDULERand retained current DSH, OneBot and server-fence changes.DSH worker adapter
DSH_HOME, model routes and credentials.ov-superagent-workerpreset and creates/resumes one native DSH session per task throughagents.create/resume.WorkerExecutor.start/done/stoptosuperagent/worker/ensure → submit → wait/cancelover the existing stdio JSON-RPC bridge.Windows adaptation
pwshon Windows andbashon Unix through the platform adapter.localSocketPath, including Windows named pipes, in production and live tests.Validation
npm run check: passed.check:dsh: passed, including worker preset creation, Core tool registration, duplicate submit suppression, independent cancellation and wait settlement.WorkerExecutortest with a local fake provider: two DSH workers completed independent real model turns concurrently in one profile, with separate prompts, results and usage.EACCESdeterministically, and the OneBot permission-preservation test sets its initial mode explicitly instead of depending on umask.Windows native shell and IPC paths are covered by tests; Windows real-machine verification remains follow-up platform testing.